home *** CD-ROM | disk | FTP | other *** search
/ Programming an RTS Game with Direct3D / Programming an RTS Game with Direct3D.iso / Examples / Chapter 12 / Example 12.5 / Debug / Shaders / objects.ps next >
Encoding:
Text File  |  2006-04-12  |  307 b   |  12 lines

  1. sampler diffuseText;
  2. sampler light;
  3.  
  4. float4 Main(float2 UV : TEXCOORD0, float2 worldUV : TEXCOORD1, float shade : TEXCOORD2) : COLOR
  5. {
  6.     //Sample the textures
  7.     float4 col  = tex2D(diffuseText, UV);
  8.     float4 l    = tex2D(light, worldUV); 
  9.  
  10.     //Return result
  11.     return col * shade * l;
  12. }